import request from '@/utils/request'

// 查询盘库单据列表
export function listReceipt(query) {
  return request({
    url: '/inventory/task/list',
    method: 'get',
    params: query
  })
}

// 查询盘库单据详细
export function getReceipt(checkGoodsId) {
  return request({
    url: '/inventory/task/' + checkGoodsId,
    method: 'get'
  })
}

// 新增盘库单据
export function addReceipt(data) {
  return request({
    url: '/inventory/task',
    method: 'post',
    data: data
  })
}

// 修改盘库单据
export function updateReceipt(data) {
  return request({
    url: '/inventory/task',
    method: 'put',
    data: data
  })
}

// 删除盘库单据
export function delReceipt(checkGoodsId) {
  return request({
    url: '/inventory/task/' + checkGoodsId,
    method: 'delete'
  })
}

// 修改出库状态
export function revokeCheckGoods(data) {
  return request({
    url: '/inventory/task/revoke',
    method: 'put',
    data: data
  })
}
